#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>



int main()
{
    printf("linying have a gorgeous grilfriend in 2024.\n");
    pid_t id=fork();
    if(id==0)
    {
        sleep(2);
        execl("./mytest","mytest","-a","-b","-c",NULL);
       // char* argv[]={"ls","-a","-l"};
       // printf("exedc begin ...\n");
       // sleep(3);
       // //execl("/usr/bin/ls","ls","-a","-l",NULL);
       // //execl("/usr/bin/top","top",NULL);
       // //execv("/usr/bin/ls",argv);
       // execvp("ls",argv);
       // exit(1);
        printf("exec end ...\n");
    }
    pid_t rid=waitpid(id,NULL,0);
    if(rid>0)
    {
        printf("wait success\n");
    }
    exit(1);
}

